home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)aai.d64
/
screen master
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
7KB
|
249 lines
50002 REM **********************
50004 REM * SCREEN MASTER *
50006 REM * *
50008 REM * BY HOWARD CAMPBELL *
50009 REM **********************
50010 :
50012 DIMSC%(1000),CL%(1000)
50015 GOSUB52730
50020 GOSUB 59000
50030 GOSUB 59100
50040 GOTO 50020
50070 :
51000 REM *************************
51001 REM * DEC TO HEX CONVERSION *
51002 REM *************************
51003 :
51010 MSB=INT(L/256):LSB=L-MSB*256
51020 POKE251,LSB:POKE252,MSB
51030 RETURN
51035 :
51040 REM *************************
51041 REM * HEX TO DEC CONVERSION *
51042 REM *************************
51043 :
51050 L=PEEK(251)+PEEK(252)*256
51060 RETURN
51070 :
52000 REM ****************
52001 REM * INSTRUCTIONS *
52002 REM ****************
52003 :
52010 PRINT"[147]CONSTRUCT YOUR TITLE PAGE AS DESIRED."
52020 PRINT"TYPE IT COMPLETE WITH COLORS, REVERSED CHARACTERS, ETC.."
52030 PRINT"TO ADD TO YOUR CONVIENIENCE, ALL KEYS WILL REPEAT."
52035 PRINT"THE CURSOR CAN'T BE MOVED TO THE EXTREMELOWER RIGHT CORNER."
52040 PRINT"WHEN THE SCREEN IS COMPLETED, PRESS [155]F1[146]."
52045 PRINT"PRESS [155]F7[146] TO LOWER THE SCREEN AND [155]F8[146] TO RAISE IT"
52050 PRINT""SPC(7)"PRESS [155]<SPACE>[146] TO CONTINUE"
52060 A$="":GETA$:IFA$=""THEN52060
52065 PRINT"[147]";
52070 RETURN
52080 :
52100 REM **************
52101 REM * ENTRY MODE *
52102 REM **************
52103 :
52110 POKE650,128
52120 PRINT"[147]PRESS [155]<SPACE>[146] TO SELECT THE SCREEN COLOR"
52125 PRINT"WHEN YOU OBTAIN THE SCREEN YOU WANT, PRESS [155]<RETURN>[156]":A=1
52130 GETA$:IFA$=" "THENA=A+1+16*(A>15):POKE53281,A:GOTO52130
52135 IFA$<>CHR$(13)THEN52130
52138 PRINT"[147]";
52140 POKE204,0:POKE205,20
52150 GETA$:IFA$=""THEN52150
52155 IFA$="[136]"THENGOSUB59200
52156 IFA$="[140]"THENGOSUB59300
52158 IFA$="[133]"THENWAIT207,1,1:POKE204,1:RETURN
52160 IFPEEK(214)=24THENIFPEEK(211)=39ORA$=""THENA$="[157]"
52165 POKE205,2
52170 WAIT207,1,1:PRINTA$;:GOTO52140
52180 :
52200 REM *********************
52201 REM * STORE SCREEN DATA *
52202 REM *********************
52203 :
52210 CO=54272:POKE253,PEEK(53281)AND15
52220 FORI=1024TO2023
52230 SC%(I-1023)=PEEK(I):CL%(I-1023)=PEEK(I+CO)AND15:POKEI,102:POKEI+CO,7
52240 NEXT:PRINT"[147]":POKE53281,12:POKE646,6:RETURN
52250 :
52300 REM *********************
52301 REM * LINE NUMBER ENTRY *
52302 REM *********************
52303 :
52310 PRINT"[147]ENTER STARTING LINE NUMBER FOR YOUR"
52320 PRINT"SCREEN DATA STATEMENTS.":INPUTL:IFL>64000THEN52310
52330 GOSUB51000
52340 RETURN
52350 :
52400 REM******************************
52401 REM* PRINT STATEMENT PRODUCTION *
52402 REM******************************
52403 :
52405 P=1:BF=0
52406 PRINT"[147]ENTER THE NAME OF THE BASIC PROGRAM":INPUTNM$
52407 OPEN15,8,15,"I0":CLOSE15:OPEN2,8,2,"@0:"+NM$+",P,W"
52408 PRINT#2,CHR$(1);CHR$(8);
52409 PRINT"[147]MAKING BASIC PROGRAM":OPEN3,3
52410 SC=1028:GOSUB51040
52420 IFP=1001THENPRINT#2,CHR$(0);CHR$(0);CHR$(0);:CLOSE2:CLOSE3:RETURN
52422 PRINT#2,CHR$(1);CHR$(8);CHR$(PEEK(251));CHR$(PEEK(252));CHR$(153);CHR$(34);
52460 SC=SC+1:CH=SC
52470 POKE254,PEEK(53281):POKE828,0
52480 PB=SC%(P):PK=CL%(P):BF=(BF+1)AND15:POKE53280,BF
52485 POKE1024,PB:POKE55296,PK:PRINT"";:GET#3,CN$:PE=ASC(CN$)
52500 IFPK<>PEEK(254)ANDPB<>32THENPOKE254,PK:GOSUB55000
52510 IFPB<127THENGOSUB56000:GOTO52540
52520 IFPEEK(828)=0THENPRINT#2,CHR$(18);:SC=SC+1:POKE828,1
52530 PRINT#2,CHR$(PE);:SC=SC+1
52540 P=P+1:IFSC-CH<=60ANDP<1001THEN52480
52545 PRINT#2,CHR$(34);CHR$(59);CHR$(0);:SC=SC+2
52560 L=L+10:GOSUB51000
52570 GOTO52410
52580 :
52730 REM **************
52731 REM * TITLE PAGE *
52732 REM **************
52733 :
52734 POKE53280,11:POKE53281,12
52735 GOSUB60000:POKE646,6
52780 TM=TI
52790 IFTM+120>TITHEN52790
52800 RETURN
52810 :
53060 :
55000 REM ***************
55001 REM * COLOR CODES *
55002 REM ***************
55003 :
55005 IFPK=0THENPRINT#2,CHR$(144);
55010 IFPK=1THENPRINT#2,CHR$(5);
55020 IFPK=2THENPRINT#2,CHR$(28);
55030 IFPK=3THENPRINT#2,CHR$(159);
55040 IFPK=4THENPRINT#2,CHR$(156);
55050 IFPK=5THENPRINT#2,CHR$(30);
55060 IFPK=6THENPRINT#2,CHR$(31);
55070 IFPK=7THENPRINT#2,CHR$(158);
55080 IFPK=8THENPRINT#2,CHR$(129);
55090 IFPK=9THENPRINT#2,CHR$(149);
55100 IFPK=10THENPRINT#2,CHR$(150);
55110 IFPK=11THENPRINT#2,CHR$(151);
55120 IFPK=12THENPRINT#2,CHR$(152);
55130 IFPK=13THENPRINT#2,CHR$(153);
55140 IFPK=14THENPRINT#2,CHR$(154);
55150 IFPK=15THENPRINT#2,CHR$(155);
55160 SC=SC+1:RETURN
55170 :
56000 REM ******************
56001 REM * CHECK RVS FLAG *
56002 REM ******************
56003 :
56005 IFPEEK(828)=1THENPRINT#2,CHR$(146);:POKE828,0:SC=SC+1
56010 PRINT#2,CHR$(PE);:SC=SC+1:RETURN
56020 :
57000 REM ///////////////
57010 REM / SAVE SCREEN /
57020 REM ///////////////
57030 :
57040 GOSUB58000:OPEN2,8,2,"@0:"+FI$+",S,W"
57045 PRINT"[147]SAVING SCREEN"
57046 BF=0
57047 PRINT#2,CHR$(PEEK(253));
57050 FORI=1TO1000:PRINT#2,CHR$(SC%(I));:PRINT#2,CHR$(CL%(I));
57052 BF=(BF+1)AND15:POKE53280,BF
57055 POKE1024,SC%(I):POKE55296,CL%(I):NEXTI
57056 POKE53280,11
57060 CLOSE2:RETURN
57070 :
57100 REM ///////////////
57110 REM / LOAD SCREEN /
57120 REM ///////////////
57130 :
57140 GOSUB58000:OPEN2,8,2,"0:"+FI$+",S,R"
57142 CO=54272
57145 GET#2,A$:IFA$=""THENA$=CHR$(0)
57146 PRINT"[147]";:POKE53281,ASC(A$):PS=PEEK(53281)+1
57147 REM BF=0
57150 FORI=1024TO2023:GET#2,A$:IFA$=""THENA$=CHR$(0)
57152 REM BF=(BF+1)AND15:POKE53280,BF
57155 POKEI,100:POKEI+CO,PS
57160 POKEI,ASC(A$)
57165 GET#2,A$:IFA$=""THENA$=CHR$(0)
57166 POKEI+CO,ASC(A$):NEXTI
57190 CLOSE2:GOSUB52140:GOSUB52200:POKE53280,11:RETURN
57195 :
57200 REM / GET LOOP /
57210 GETA$:IFA$=""THEN57210
57215 A=VAL(A$):IFA<1ORA>ZTHEN57210
57220 RETURN
57230 :
57300 REM / CONSTRUCT SCREEN TRUNK /
57310 GOSUB52000:GOSUB52100:GOSUB52200:RETURN
57320 :
57400 REM / CONVERT TO BASIC PROGRAM /
57410 GOSUB 52300:GOSUB52400:POKE53280,11:POKE646,6:RETURN
57420 :
58000 REM / NAME PROMPT /
58010 PRINT"[147]ENTER THE FILE NAME (DON'T ADD [171])":INPUTFI$:FI$=CHR$(171)+FI$
58020 RETURN
58030 :
59000 REM ////////
59010 REM / MENU /
59020 REM ////////
59030 :
59045 Z=2:PRINT"[147]"SPC(11)"1[146] - LOAD SCREEN"
59050 PRINTSPC(11)"2[146] - CONSTRUCT SCREEN"
59060 GOSUB57200:ON A GOSUB 57100,57300
59080 RETURN
59090 :
59100 Z=3:PRINT"[147]"SPC(11)"1[146] - SAVE SCREEN"
59110 PRINTSPC(11)"2[146] - CONVERT TO BASIC"
59115 PRINTSPC(11)"3[146] - RETURN TO MAIN MENU"
59120 GOSUB 57200:ON A GOSUB 57000,57400
59130 RETURN
59200 REM /////////////////////
59210 REM / SHIFT SCREEN DOWN /
59220 REM /////////////////////
59230 :
59240 PRINT""SPC(10)"LOWERING SCREEN";
59242 WAIT207,1,1:POKE204,1
59245 FORI=2023TO1064STEP-1
59250 POKEI,PEEK(I-40):POKEI+54272,PEEK(I+54272-40)
59260 NEXTI
59270 FORI=1024TO1063:POKEI,32:NEXTI
59275 POKE204,0:POKE205,20
59280 RETURN
59290 :
59300 REM /////////////////////
59310 REM / SHIFT SCREEN UP /
59320 REM /////////////////////
59330 :
59340 PRINT""SPC(10)"RAISING SCREEN";
59342 WAIT207,1,1:POKE204,1
59345 FORI=1024TO1983
59350 POKEI,PEEK(I+40):POKEI+54272,PEEK(I+54272+40)
59360 NEXTI
59370 FORI=1984TO2023:POKEI,32:NEXTI
59375 POKE204,0:POKE205,20
59380 RETURN
60000 PRINT"[147] ";
60010 PRINT" ";
60020 PRINT" [151][169] ";
60030 PRINT"[151] [206][146] [169] [206] [146] ";
60040 PRINT" [151][169] [206] [146] [144] ";
60050 PRINT"[144] [151] [146] [144] ";
60060 PRINT" [144] [151] [146] [144] [144] [151] [146] ";
60070 PRINT" [144] SCREEN MASTER [144] [151] [146] [144] ";
60080 PRINT" [184][184][184][184][184][184][184][184][184][184][184][184][184][184] [144] [151] [146] [144] ";
60090 PRINT" [144] [151] [146] [144] BY [144] [151] [146] ";
60100 PRINT" [144] [144] [151] [146] ";
60110 PRINT"[144] HOWARD CAMPBELL [144] [151] [146] [144] ";
60120 PRINT" [144] [151] [146] [144] [144] [151] ";
60130 PRINT"[151] [146] [144] [151] [146][169] ";
60140 PRINT" [144] [209][209]... [151] [146][169] [144] ";
60150 PRINT"[144] [151][146][169] ";
60160 PRINT" ";
60170 PRINT" ";
60180 RETURN